<?php

class taobaoModel extends Model {

    private $table = '`sd_taobao`';

    public function add($data) {        
        return $this->_insert($this->table, $data);
    }
    
    public function all($id){
         return $this->_all("SELECT * FROM `sd_taobao` where member_id = {$id} order by taobao_id desc");
    }
    
    public function all1(){
         return $this->_all("SELECT * FROM `sd_taobao` order by taobao_id desc");
    }
    public function update($data,$id){
        $where = "WHERE taobao_id = ".$id;
        Return $this->_update($this->table, $data, $where);
    }
}